#ifndef __64BIT_KERNEL_MM_H__
#define __64BIT_KERNEL_MM_H__
#include "types.h"
#include "bitmap.h"

#define PAGE_SIZE 4096

typedef struct 
{
    u32 base_addr_low;
    u32 base_addr_high;
    u32 length_low;
    u32 length_high;
    u32 type;
} check_memory_item_t;

typedef struct
{
    u16 count;
    check_memory_item_t *data;
} check_memory_info_t;

typedef struct
{
    u32 addr_start;
    u32 addr_end;
    u32 valid_mem_size;
    u32 pages_total;
    u32 pages_free;
    u32 pages_used;
} physics_memory_info_t;

typedef struct 
{
    u32 addr_base;
    u32 pages_total;
    bitmap_t bitmap;
    u8 * bitmap_buf;
} physics_memory_map_t;

void print_check_memory_info();

void phy_memory_init();

void* get_free_page();

void free_page(void* p);


#endif